﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.OracleClient;
using DBUtility;

namespace BLL.DutyAssignment
{
    public class B_DutyPerson
    {
        private readonly OracleDAL.DutyAssignment.D_DutyPerson dal = new OracleDAL.DutyAssignment.D_DutyPerson();
        /// <summary>
        /// 获得数据列表
        /// </summary>
        public DataSet GetList(string strWhere)
        {
            return dal.GetList(strWhere);
        }

        /// <summary>
        /// 增加一条数据
        /// </summary>
        public bool Add(Model.DutyAssignment.M_DutyPerson model)
        {
            return dal.Add(model);
        }

        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(Model.DutyAssignment.M_DutyPerson model)
        {
            return dal.Update(model);
        }

        /// <summary>
        /// 删除一条数据
        /// </summary>
        public bool Delete(string USERISN)
        {

            return dal.Delete(USERISN);
        }

        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public Model.DutyAssignment.M_DutyPerson GetModel(string USERISN)
        {

            return dal.GetModel(USERISN);
        }


        /// <summary>
        /// 用于值班人员设置时用，一次性插入多个值班人员
        /// </summary>
        /// <param name="userIsns"></param>
        /// <param name="dutyID"></param>
        /// <param name="unitisn"></param>
        /// <param name="zdr"></param>
        /// <returns></returns>
        public bool AddMultiModel(string userIsns, string dutyID,string unitIsn,string zdr)
        {
            return dal.AddMultiModel(userIsns, dutyID,unitIsn,zdr);
        }
    }
}
